<?php View::render('admin/layouts/meta'); ?>
<link rel="stylesheet" type="text/css" href="<?php echo Router::getBaseUrl();?>/assets/js/webuploader.css" />
<body>
<div class="cl pd-20" style=" background-color:#f5fafe">
	<table class="table">
		<tbody>
			<tr>
				<th class="text-r" width="80">订单号：</th>
				<td><?php echo $orderInfo['order_no'];?></td>
                <th class="text-r" width="80">订单名称：</th>
				<td><?php echo $orderInfo['title'];?></td>
			</tr>
			<tr>
				<th class="text-r">订单状态：</th>
				<td><?php echo $orderInfo['pay_status']==0?'未支付':'已支付';?></td>
                <th class="text-r">商品数量：</th>
				<td><?php echo $orderInfo['total'];?></td>
			</tr>
            <?php if($orderInfo['address_info']){$addressInfo = json_decode($orderInfo['address_info'], true);?>
			<tr>
				<th class="text-r">收件人：</th>
				<td><?php echo $addressInfo['name'];?></td>
                <th class="text-r">联系电话：</th>
				<td><?php echo $addressInfo['mobile'];?></td>
			</tr>
            <tr>
				<th class="text-r">详细地址：</th>
				<td colspan="3">
                    <?php echo $addressInfo['province'].' '.$addressInfo['city'].' '.$addressInfo['area'].' '.$addressInfo['address'];?>
                </td>
			</tr>
            <?php }?>
		</tbody>
	</table>
</div> 
<article class="page-container">
	<form action="" method="post" class="form form-horizontal" id="form-member-add">
        <div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>快递公司：</label>
			<div class="formControls col-xs-8 col-sm-9">
                <span class="select-box" style="width:200px;">
                    <select class="select" name="express_com">
                        <option value="">--选择--</option>
                        <?php if($expressCom){ foreach ($expressCom as $com){?>
                        <option value="<?php echo $com['no']?>"><?php echo $com['com'];?></option>
                        <?php }}?>
                    </select>
                </span>
			</div>
		</div>
        
        <div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>快递编号：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="<?php echo $orderInfo?$orderInfo['express_no']:'';?>" placeholder="" name="express_no">
			</div>
		</div>
        
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <input type="hidden" name="orderId" value="<?php echo $orderInfo?$orderInfo['id']:0;?>" />
                <input class="btn btn-primary radius" type="button" id="j_submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</article>
</body>
<?php View::render('admin/layouts/footer'); ?>
<script type="text/javascript" src="<?php echo Router::getBaseUrl();?>/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="<?php echo Router::getBaseUrl();?>/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="<?php echo Router::getBaseUrl();?>/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="<?php echo Router::getBaseUrl();?>/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript" src="<?php echo Router::getBaseUrl();?>/assets/js/webuploader.min.js"></script>
<script type="text/javascript" src="<?php echo Router::getBaseUrl();?>/lib/ueditor/1.4.3/ueditor.config.js"></script> 
<script type="text/javascript" src="<?php echo Router::getBaseUrl();?>/lib/ueditor/1.4.3/ueditor.all.min.js"> </script> 
<script type="text/javascript" src="<?php echo Router::getBaseUrl();?>/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
$(function(){
  $('#j_submit').click(function(){
      var $btn = $(this);
        $btn.button('loading');
        $.post('<?php echo Router::getBaseUrl();?>/admin_order/post', $('form').serialize(), function (result) {
            if (result.status == 200) {
                layer.msg(result.msg, {
                    icon: 1,
                    skin: 'u-msg',
                    time: 1800,
                }, function(){
                   var index = parent.layer.getFrameIndex(window.name); 
                    parent.layer.close(index);
                });
                $btn.button('reset');
                return true;
            }
            layer.msg(result.msg, {
                icon: 0,
                skin: 'u-msg',
                time: 3000,
            }, function () {

            });
            $btn.button('reset');
        }, 'json');
        return;
  });
});
</script>
</html>